import React, { useState, useEffect } from 'react';
import { Layout, Divider, message } from 'antd';
import styles from './index.less';
import { wuhanLogo } from '@/utils/util';
import { history } from '@@/core/history';
const { Header } = Layout;

const RegisterHeader: React.FC = (props) => {
  const gotoIndex = () => {
    try {
      history.push({ pathname: '/' });
    } catch (error) {
      message.error('请联系管理员');
    }
  };
  return (
    <Header className={styles.headerWrapper}>
      <div className={styles.headerContent}>
        <div className={styles.logoContent}>
          <img className={styles.logo} src={wuhanLogo} />
          <Divider
            type="vertical"
            style={{ background: ' #708BB5', height: 40, marginBottom: 15 }}
          />
          <span className={styles.logoText}>企业注册</span>
        </div>
        <div className={styles.textContent}>
          <a className={styles.leftText} onClick={gotoIndex}>
            已经有账号？马上登录
          </a>
          <Divider type="vertical" style={{ background: ' #708BB5', height: 14 }} />
          <a className={styles.rightText} onClick={gotoIndex}>
            返回首页
          </a>
        </div>
      </div>
    </Header>
  );
};
export default RegisterHeader;
